package com.ruoyi.transfers.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.transfers.mapper.WGoodsTransferRelMapper;
import com.ruoyi.transfers.domain.WGoodsTransferRel;
import com.ruoyi.transfers.service.IWGoodsTransferRelService;

/**
 * 货转关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-15
 */
@Service
public class WGoodsTransferRelServiceImpl implements IWGoodsTransferRelService 
{
    @Autowired
    private WGoodsTransferRelMapper wGoodsTransferRelMapper;

    /**
     * 查询货转关联
     * 
     * @param goodsTransferId 货转关联主键
     * @return 货转关联
     */
    @Override
    public WGoodsTransferRel selectWGoodsTransferRelByGoodsTransferId(Long goodsTransferId)
    {
        return wGoodsTransferRelMapper.selectWGoodsTransferRelByGoodsTransferId(goodsTransferId);
    }

    /**
     * 查询货转关联列表
     * 
     * @param wGoodsTransferRel 货转关联
     * @return 货转关联
     */
    @Override
    public List<WGoodsTransferRel> selectWGoodsTransferRelList(WGoodsTransferRel wGoodsTransferRel)
    {
        return wGoodsTransferRelMapper.selectWGoodsTransferRelList(wGoodsTransferRel);
    }

    /**
     * 新增货转关联
     * 
     * @param wGoodsTransferRel 货转关联
     * @return 结果
     */
    @Override
    public int insertWGoodsTransferRel(WGoodsTransferRel wGoodsTransferRel)
    {
        return wGoodsTransferRelMapper.insertWGoodsTransferRel(wGoodsTransferRel);
    }

    /**
     * 修改货转关联
     * 
     * @param wGoodsTransferRel 货转关联
     * @return 结果
     */
    @Override
    public int updateWGoodsTransferRel(WGoodsTransferRel wGoodsTransferRel)
    {
        return wGoodsTransferRelMapper.updateWGoodsTransferRel(wGoodsTransferRel);
    }

    /**
     * 批量删除货转关联
     * 
     * @param goodsTransferIds 需要删除的货转关联主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsTransferRelByGoodsTransferIds(Long[] goodsTransferIds)
    {
        return wGoodsTransferRelMapper.deleteWGoodsTransferRelByGoodsTransferIds(goodsTransferIds);
    }

    /**
     * 删除货转关联信息
     * 
     * @param goodsTransferId 货转关联主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsTransferRelByGoodsTransferId(Long goodsTransferId)
    {
        return wGoodsTransferRelMapper.deleteWGoodsTransferRelByGoodsTransferId(goodsTransferId);
    }

    /**
     * 新增货转关联
     *
     * @param goodsIds 货转关联
     * @param goodsTransferId 货转关联
     * @return 结果
     */
    @Override
    public int insertWGoodsTransferRelExt(List<Long> goodsIds, Long goodsTransferId)
    {
        return wGoodsTransferRelMapper.insertWGoodsTransferRelExt(goodsIds, goodsTransferId);
    }

    /**
     * 新增货转关联
     *
     * @param goodsIds 货转关联
     * @param goodsTransferId 货转关联
     * @return 结果
     */
    @Override
    public int deleteWGoodsTransferRelExt(List<Long> goodsIds, Long goodsTransferId)
    {
        return wGoodsTransferRelMapper.deleteWGoodsTransferRelExt(goodsIds, goodsTransferId);
    }

    /**
     * 新增货转关联
     *
     * @param goodsIds 货转关联
     * @param goodsTransferId 货转关联
     * @return 结果
     */
    @Override
    public List<Long> selectWGoodsTransferRelExt(List<Long> goodsIds, Long goodsTransferId)
    {
        return wGoodsTransferRelMapper.selectWGoodsTransferRelExt(goodsIds, goodsTransferId);
    }

}
